#include"Chain_BinaryTree.h"


void test1()
{
	CBTree* n1 = Buynode(1);
	CBTree* n2 = Buynode(2);
	CBTree* n3 = Buynode(4);
	CBTree* n4 = Buynode(3);
	CBTree* n5 = Buynode(5);
	CBTree* n6 = Buynode(6);
	CBTree* n7 = Buynode(7);
	CBTree* n8 = Buynode(12);
	CBTree* n9 = Buynode(22);

	n1->leftchild = n2;
	n1->rightchild = n3;
	n2->leftchild = n4;
	n3->leftchild = n5;
	n3->rightchild = n6;
	n4->rightchild = n7;
	n6->leftchild = n7;
	n7->leftchild = n8;
	n8->leftchild = n9;

	//printf("%d\n",TreeHeight(n1));
	//printf("%d\n", BinaryTreeLevelKSize(n1,4));
	//CBTree* ret = BinaryTreeFind(n1, 4);
    //printf("%d", ret->leftchild->a);
	

	
	printf("%d", TreeLeafSize(n1));
	//Levelorder(n1);
	TreeDestory(&n1);
	
}

int main()
{
	test1();
	return 0;
}